package com.smallbug.longman.bean;

import java.util.ArrayList;
import java.util.Iterator;


public class Sense {
	public String DEF;//定义
	public ArrayList<Subsense> Subsenses;
	public String SenseId;
	public String sensenum;
	public ArrayList<EXAMPLE> Examples;
	public String ILLUSTRATION;
	public String Audio_SFX;

	public String getDEF() {
		return DEF;
	}

	public void setDEF(String DEF) {
		this.DEF = DEF;
	}

	public ArrayList<Subsense> getSubsenses() {
		return Subsenses;
	}

	public void setSubsenses(ArrayList<Subsense> subsenses) {
		Subsenses = subsenses;
	}

	public String getSenseId() {
		return SenseId;
	}

	public void setSenseId(String senseId) {
		SenseId = senseId;
	}

	public String getSensenum() {
		return sensenum;
	}

	public void setSensenum(String sensenum) {
		this.sensenum = sensenum;
	}

	public ArrayList<EXAMPLE> getExamples() {
		return Examples;
	}

	public void setExamples(ArrayList<EXAMPLE> examples) {
		Examples = examples;
	}

	public String getILLUSTRATION() {
		return ILLUSTRATION;
	}

	public void setILLUSTRATION(String ILLUSTRATION) {
		this.ILLUSTRATION = ILLUSTRATION;
	}

	public String getAudio_SFX() {
		return Audio_SFX;
	}

	public void setAudio_SFX(String audio_SFX) {
		Audio_SFX = audio_SFX;
	}
	public void print()
	{
		if(DEF != null)
		System.out.println("Sense Def:\t" + DEF);
		if(ILLUSTRATION != null)
		System.out.println("Sense ILLUSTRATION:\t" + ILLUSTRATION);
		if(Audio_SFX != null)
		System.out.println("Sense Audio_SFX:\t" + Audio_SFX);
		
		EXAMPLE example = null;
		if(Examples != null)
		{
			Iterator iter = Examples.iterator();
			while (iter.hasNext()) {
				example = (EXAMPLE)iter.next();
				example.print();
			}
		}		
	}

	@Override
	public String toString() {
		return "Sense{" +
				"DEF='" + DEF + '\'' +
				", Subsenses=" + Subsenses +
				", SenseId='" + SenseId + '\'' +
				", sensenum='" + sensenum + '\'' +
				", Examples=" + Examples +
				", ILLUSTRATION='" + ILLUSTRATION + '\'' +
				", Audio_SFX='" + Audio_SFX + '\'' +
				'}';
	}
}
